<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    *{
        margin:0 auto;
    }
    html,body{
        width:100%;
        height:100%;
    }
    .container{
        width:100%;
        height:100%;
    }
    .boxImg{
        width:100%;
        height:200px;
    }
    .list{
        width:100%;
        height:auto
    }
    .content{
        width:100%;
        display: flex;
        height:60px;
    }
    .content p{
        flex:1;
        text-overflow: ellipsis;
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        line-height:30px;
        font-size: 20px;
        -webkit-box-orient: vertical;
    }
    .img{
        width:60px;
        height:60px;
        flex:none;
    }
</style>
<body>
   <div class="container">
       <img src="./img/1.png" class = "boxImg" alt="">
       <div class="list">
           <div class="content">
               <p>单行</p>
               <img src="./img/2.png" class="img" alt="">
           </div>
           <div class="content">
            <p>多行超过字数多行超过字数多行超过字数多行超过字数多行超过字数多行超过字数多行超过字数多行超过字数</p>
            <img src="./img/2.png" class="img" alt="">
        </div>
       </div>
   </div>
   <script>
    //    const getQueryParams = (url) => { 
    //     // @return obj // 所有query组成的对象
    //     let obj = {}
    //     let arr = url.split("?")[1].split("&")
    //       for(var i=0;i<arr.length;i++){
    //           let str = arr[i].split("=")
    //           obj[str[0]] = str[1]
              
    //       }
    //       return obj
    //    }
    //    getQueryParams(window.location.href)
    var arr = [2,6,8,7,1,3]
    function sortFun(arr){
        let temp = 0
       for(var i=0;i<arr.length;i++){
           for(var j=0;j<arr.length-i;j++){
               if(arr[j]<arr[j+1]){
                   temp= arr[j]
                   arr[j] = arr[j+1]
                   arr[j+1] = temp
               }
           }
       }
       console.log(arr)
    }
    sortFun(arr)
   </script>
</body>
</html>